Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corresponding timeline option for directory input #145

Merged
merged 9 commits into from
Mar 29, 2024

Conversation

hitenkoku
Copy link
Collaborator

What Changed

@hitenkoku hitenkoku added the enhancement New feature or request label Mar 23, 2024
@hitenkoku hitenkoku self-assigned this Mar 23, 2024
@hitenkoku hitenkoku linked an issue Mar 23, 2024 that may be closed by this pull request
Copy link
Collaborator

@fukusuket fukusuket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hitenkoku
When I tried specifying a directory in -t option, file does not exist was displayed, but maybe I'm using it incorrectly?🤔 (I think that changed it so that the directory can be specified in the -t option instead of the -d option.)

% pwd
/Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ls -la tl
total 688144
drwxr-xr-x  10 fukusuke  staff       320  3 22 20:19 .
drwx------@ 24 fukusuke  staff       768  3 23 22:30 ..
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:49 timeline--European-time.jsonl
-rw-r--r--   1 fukusuke  staff  43927488  3 17 09:50 timeline--ISO-8601.jsonl
-rw-r--r--   1 fukusuke  staff  44072814  3 17 09:50 timeline--RFC-2822.jsonl
-rw-r--r--   1 fukusuke  staff  44089744  3 17 09:50 timeline--RFC-3339.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:51 timeline--US-military-time.jsonl
-rw-r--r--   1 fukusuke  staff  44122107  3 17 09:51 timeline--US-time.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:51 timeline--UTC.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 13:50 timeline.jsonl
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -q -t /Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl
The file '/Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl' does not exist. Please specify a valid file path.
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -q -t /Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl/
The file '/Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl/' does not exist. Please specify a valid file path.
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -q -t ./tl
The file './tl' does not exist. Please specify a valid file path.

Also, csv-timeline seems to fail in Integration-Test, so could you please check it?🙏
https:/Yamato-Security/takajo/actions/runs/8402036417/job/23011009274#step:24:26

@fukusuket
Copy link
Collaborator

fukusuket commented Mar 24, 2024

@hitenkoku
I noticed this while preparing for BSides(Sorry for the late preparation...😅) Velociraptor stores hayabusa's uploaded results in the following path on the server side.

  • /tmp/gui_datastore/clients/<CLIENT ID>/collections/<ARTIFACT ID>/uploads/auto/hayabusa-result.jsonl

Therefore, I think it would be nice if we could specify the root path to -t option and search for .jsonl recursively(then we could get the takajo results in one go without using the Velociraptor GUI)

  • ./takajo automagic -t /tmp/gui_datastore/clients/

@fukusuket
Copy link
Collaborator

fukusuket commented Mar 24, 2024

Sorry to bother you again...😅
After looking into Velociraptor's features a little more, I found that it is also possible to download the Hayabusa results of all clients as one JSON in one Hunt execution. If you execute the part in red below, the results of multiple clients will be stored in one JSON file and can be downloaded.(But depending on the file size, I think it would be better to be able to analyze it directly on the server.)

スクリーンショット 2024-03-24 15 22 25

@hitenkoku
Copy link
Collaborator Author

hitenkoku commented Mar 26, 2024

@fukusuket Sorry for late reply.
I fixed following problem in fc4bf60

@hitenkoku When I tried specifying a directory in -t option, file does not exist was displayed, but maybe I'm using it incorrectly?🤔 (I think that changed it so that the directory can be specified in the -t option instead of the -d option.)

% pwd
/Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ls -la tl
total 688144
drwxr-xr-x  10 fukusuke  staff       320  3 22 20:19 .
drwx------@ 24 fukusuke  staff       768  3 23 22:30 ..
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:49 timeline--European-time.jsonl
-rw-r--r--   1 fukusuke  staff  43927488  3 17 09:50 timeline--ISO-8601.jsonl
-rw-r--r--   1 fukusuke  staff  44072814  3 17 09:50 timeline--RFC-2822.jsonl
-rw-r--r--   1 fukusuke  staff  44089744  3 17 09:50 timeline--RFC-3339.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:51 timeline--US-military-time.jsonl
-rw-r--r--   1 fukusuke  staff  44122107  3 17 09:51 timeline--US-time.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:51 timeline--UTC.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 13:50 timeline.jsonl
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -q -t /Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl
The file '/Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl' does not exist. Please specify a valid file path.
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -q -t /Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl/
The file '/Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl/' does not exist. Please specify a valid file path.
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -q -t ./tl
The file './tl' does not exist. Please specify a valid file path.

Also, csv-timeline seems to fail in Integration-Test, so could you please check it?🙏 https:/Yamato-Security/takajo/actions/runs/8402036417/job/23011009274#step:24:26

@fukusuket
Copy link
Collaborator

fukusuket commented Mar 26, 2024

@hitenkoku
Thank you so much for fix!
I still get error Failed to open '...'. Please specify a valid file path. when specifying a directory with the -t option, but is this a macOS-specific issue...?🤔

% ls -la ./tl
total 688144
drwxr-xr-x  10 fukusuke  staff       320  3 22 20:19 .
drwx------@ 20 fukusuke  staff       640  3 26 21:52 ..
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:49 timeline--European-time.jsonl
-rw-r--r--   1 fukusuke  staff  43927488  3 17 09:50 timeline--ISO-8601.jsonl
-rw-r--r--   1 fukusuke  staff  44072814  3 17 09:50 timeline--RFC-2822.jsonl
-rw-r--r--   1 fukusuke  staff  44089744  3 17 09:50 timeline--RFC-3339.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:51 timeline--US-military-time.jsonl
-rw-r--r--   1 fukusuke  staff  44122107  3 17 09:51 timeline--US-time.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 09:51 timeline--UTC.jsonl
-rw-r--r--   1 fukusuke  staff  44025018  3 17 13:50 timeline.jsonl
fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -t tl -q
Failed to open 'tl'. Please specify a valid file path.

fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -t ./tl -q
Failed to open './tl'. Please specify a valid file path.

fukusuke@fukusukenoMacBook-Air hayabusa-2.13.0-mac % ./takajo automagic -t /Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl/ -q
Failed to open '/Users/fukusuke/Hayabusa/hayabusa-2.13.0-mac/tl/'. Please specify a valid file path.

Also, could you please check the following error?🙏
https:/Yamato-Security/takajo/actions/runs/8433564638/job/23094876153

@fukusuket
Copy link
Collaborator

fukusuket commented Mar 26, 2024

I also checked in my Windows 11 environment! but it seems to be an error🤔
Is it wrong to specify a directory for the -t option..?

PS C:\tmp\takajo-2.4.0-win> dir .\test\


    ディレクトリ: C:\tmp\takajo-2.4.0-win\test


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        2024/03/14      7:11       44143851 timeline.jsonl


PS C:\tmp\takajo-2.4.0-win> .\takajo.exe automagic -t C:\tmp\takajo-2.4.0-win\test -q
Failed to open 'C:\tmp\takajo-2.4.0-win\test'. Please specify a valid file path.

PS C:\tmp\takajo-2.4.0-win> .\takajo.exe automagic -t C:\tmp\takajo-2.4.0-win\test\ -q
Failed to open 'C:\tmp\takajo-2.4.0-win\test\'. Please specify a valid file path.

@hitenkoku
Copy link
Collaborator Author

My confirmation was insufficient.

I fixed in 1c02961. Would you check it?

> ./takajo.exe automagic -t .\testdir -o test
┏━━━━┳━━━┳┓┏━┳━━━┓ ┏┳━━━┓
┃┏┓┏┓┃┏━┓┃┃┃┏┫┏━┓┃ ┃┃┏━┓┃
┗┛┃┃┗┫┃ ┃┃┗┛┛┃┃ ┃┃ ┃┃┃ ┃┃
  ┃┃ ┃┗━┛┃┏┓┓┃┗━┛┣┓┃┃┃ ┃┃
  ┃┃ ┃┏━┓┃┃┃┗┫┏━┓┃┗┛┃┗━┛┃
  ┗┛ ┗┛ ┗┻┛┗━┻┛ ┗┻━━┻━━━┛
  by Yamato Security

Started the automagic command

Automatically executes as many commands as possible and output results to a new folder.

File: testdir\testdir2\3.jsonl (42.08 MB)
Counting total lines. Please wait.
Total lines: 32,332

Scanning the Hayabusa timeline. Please wait.

100%|█████████████████████████| 32332/32332 [ 0.9s< 0.0s,  59.21k/sec]

┌───────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Command                           │ Results                                                                                                                 │ Saved Files                                                                                                             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ extract-scriptblocks              │ PowerShell logs: 108                                                                                                    │ test/scriptblock-logs/Summary.csv (19.86 KB)                                    test/scriptblock-logs/*.txt             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains                      │ Domains: 0                                                                                                              │ test/ListDomains.txt (0 Bytes)                                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains(detailed)            │ Domains: 2                                                                                                              │ test/ListDomainsDetailed.txt (16 Bytes)                                                                                 │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-hashes                       │ MD5: 894                                                                        SHA1: 831                               │ test/ListHashes-MD5.txt (4.45 KB)                                               test/ListHashes-SHA1.txt (5.21 KB)      │
│                                   │ SHA256: 838                                                                     Import: 894                             │ test/ListHashes-SHA256.txt (8.31 KB)                                            test/ListHashes-ImportHashes.txt (4.08  │
│                                   │                                                                                                                         │ KB)                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-ip-addresses                 │ IP adddresses: 0                                                                                                        │ test/ListIP-Addresses.txt (0 Bytes)                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-cmdlines                    │ Unique cmdlines: 1,224                                                                                                  │ test/StackCmdlines.csv (413.00 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 53                                                                                                    │ test/StackTargetComputers.csv (45.05 KB)                                                                                │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 3,571                                                                                                 │ test/StackSourceComputers.csv (383.32 KB)                                                                               │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-dns                         │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(source)        │ Unique ip-addresses(source): 18                                                                                         │ test/StackSourceIP-Addresses.csv (2.01 KB)                                                                              │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(target)        │ Unique ip-addresses(target): 13                                                                                         │ test/StackTargetIP-Addresses.csv (1.25 KB)                                                                              │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-logons                      │ Unique logons: 44                                                                                                       │ test/StackLogons.csv (2.69 KB)                                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-processes                   │ Unique processes: 138                                                                                                   │ test/StackProcesses.csv (27.91 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-services                    │ Unique services: 276                                                                                                    │ test/StackServices.csv (134.28 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-tasks                       │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(target)               │ Unique users(target): 36                                                                                                │ test/StackTargetUsers.csv (21.05 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test/StackTargetUsers-NoFiltering.csv (28.19 KB)                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(source)               │ Unique users(source): 36                                                                                                │ test/StackSourceUsers.csv (21.05 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test/StackSourceUsers-NoFiltering.csv (28.19 KB)                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-logon                │ EID 4624 (Successful Logon): 310                                                EID 4625 (Failed Logon): 3,574          │ test/TimelineLogon.csv (0 Bytes)                                                                                        │
│                                   │ EID 4634 (Logoff): 13                                                           EID 4647 (User Initiated Logoff): 27    │                                                                                                                         │
│                                   │ EID 4648 (Explicit Logon): 307                                                  EID 4672 (Admin Logon): 103             │                                                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-partition-diagnostic │ Events: 0                                                                                                               │ test/TimelinePartitionDiagnostic.csv (81 Bytes)                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-suspicious-processes │ Events: 3,547                                                                                                           │ test/TimelineSuspiciousProcesses.csv (2.44 MB)                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-tasks                │ Events: 8                                                                                                               │ test/TimelineTask.csv (3.77 KB)                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-summary                       │ TTPs: 178                                                                                                               │ test/TTPSummary.csv (107.17 KB)                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-visualize                     │ You can import this into ATT&CK Navigator                                                                               │ test/MitreTTP-Heatmap.json (25.39 KB)                                                                                   │
└───────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Elapsed time: 0 hours, 0 minutes, 1 seconds

Started the automagic command

Automatically executes as many commands as possible and output results to a new folder.

File: testdir\2.jsonl (42.08 MB)
Counting total lines. Please wait.
Total lines: 32,332

Scanning the Hayabusa timeline. Please wait.

100%|█████████████████████████| 32332/32332 [ 0.9s< 0.0s,  59.28k/sec]

┌───────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Command                           │ Results                                                                                                                 │ Saved Files                                                                                                             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ extract-scriptblocks              │ PowerShell logs: 108                                                                                                    │ test/scriptblock-logs/Summary.csv (39.73 KB)                                    test/scriptblock-logs/*.txt             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains                      │ Domains: 0                                                                                                              │ test/ListDomains.txt (0 Bytes)                                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains(detailed)            │ Domains: 2                                                                                                              │ test/ListDomainsDetailed.txt (32 Bytes)                                                                                 │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-hashes                       │ MD5: 894                                                                        SHA1: 831                               │ test/ListHashes-MD5.txt (4.45 KB)                                               test/ListHashes-SHA1.txt (5.21 KB)      │
│                                   │ SHA256: 838                                                                     Import: 894                             │ test/ListHashes-SHA256.txt (8.31 KB)                                            test/ListHashes-ImportHashes.txt (4.08  │
│                                   │                                                                                                                         │ KB)                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-ip-addresses                 │ IP adddresses: 0                                                                                                        │ test/ListIP-Addresses.txt (0 Bytes)                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-cmdlines                    │ Unique cmdlines: 1,224                                                                                                  │ test/StackCmdlines.csv (413.00 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 53                                                                                                    │ test/StackTargetComputers.csv (45.05 KB)                                                                                │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 3,571                                                                                                 │ test/StackSourceComputers.csv (383.32 KB)                                                                               │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-dns                         │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(source)        │ Unique ip-addresses(source): 18                                                                                         │ test/StackSourceIP-Addresses.csv (2.01 KB)                                                                              │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(target)        │ Unique ip-addresses(target): 13                                                                                         │ test/StackTargetIP-Addresses.csv (1.25 KB)                                                                              │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-logons                      │ Unique logons: 44                                                                                                       │ test/StackLogons.csv (2.69 KB)                                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-processes                   │ Unique processes: 138                                                                                                   │ test/StackProcesses.csv (27.91 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-services                    │ Unique services: 276                                                                                                    │ test/StackServices.csv (134.28 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-tasks                       │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(target)               │ Unique users(target): 36                                                                                                │ test/StackTargetUsers.csv (21.05 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test/StackTargetUsers-NoFiltering.csv (28.19 KB)                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(source)               │ Unique users(source): 36                                                                                                │ test/StackSourceUsers.csv (21.05 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test/StackSourceUsers-NoFiltering.csv (28.19 KB)                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-logon                │ EID 4624 (Successful Logon): 310                                                EID 4625 (Failed Logon): 3,574          │ test/TimelineLogon.csv (0 Bytes)                                                                                        │
│                                   │ EID 4634 (Logoff): 13                                                           EID 4647 (User Initiated Logoff): 27    │                                                                                                                         │
│                                   │ EID 4648 (Explicit Logon): 307                                                  EID 4672 (Admin Logon): 103             │                                                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-partition-diagnostic │ Events: 0                                                                                                               │ test/TimelinePartitionDiagnostic.csv (81 Bytes)                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-suspicious-processes │ Events: 3,547                                                                                                           │ test/TimelineSuspiciousProcesses.csv (2.44 MB)                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-tasks                │ Events: 8                                                                                                               │ test/TimelineTask.csv (7.54 KB)                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-summary                       │ TTPs: 178                                                                                                               │ test/TTPSummary.csv (214.34 KB)                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-visualize                     │ You can import this into ATT&CK Navigator                                                                               │ test/MitreTTP-Heatmap.json (50.79 KB)                                                                                   │
└───────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Elapsed time: 0 hours, 0 minutes, 1 seconds

Started the automagic command

Automatically executes as many commands as possible and output results to a new folder.

File: testdir\1.jsonl (42.08 MB)
Counting total lines. Please wait.
Total lines: 32,332

Scanning the Hayabusa timeline. Please wait.

100%|█████████████████████████| 32332/32332 [ 0.9s< 0.0s,  59.63k/sec]

┌───────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Command                           │ Results                                                                                                                 │ Saved Files                                                                                                             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ extract-scriptblocks              │ PowerShell logs: 108                                                                                                    │ test/scriptblock-logs/Summary.csv (59.59 KB)                                    test/scriptblock-logs/*.txt             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains                      │ Domains: 0                                                                                                              │ test/ListDomains.txt (0 Bytes)                                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains(detailed)            │ Domains: 2                                                                                                              │ test/ListDomainsDetailed.txt (48 Bytes)                                                                                 │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-hashes                       │ MD5: 894                                                                        SHA1: 831                               │ test/ListHashes-MD5.txt (4.45 KB)                                               test/ListHashes-SHA1.txt (5.21 KB)      │
│                                   │ SHA256: 838                                                                     Import: 894                             │ test/ListHashes-SHA256.txt (8.31 KB)                                            test/ListHashes-ImportHashes.txt (4.08  │
│                                   │                                                                                                                         │ KB)                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-ip-addresses                 │ IP adddresses: 0                                                                                                        │ test/ListIP-Addresses.txt (0 Bytes)                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-cmdlines                    │ Unique cmdlines: 1,224                                                                                                  │ test/StackCmdlines.csv (413.00 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 53                                                                                                    │ test/StackTargetComputers.csv (45.05 KB)                                                                                │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 3,571                                                                                                 │ test/StackSourceComputers.csv (383.32 KB)                                                                               │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-dns                         │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(source)        │ Unique ip-addresses(source): 18                                                                                         │ test/StackSourceIP-Addresses.csv (2.01 KB)                                                                              │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(target)        │ Unique ip-addresses(target): 13                                                                                         │ test/StackTargetIP-Addresses.csv (1.25 KB)                                                                              │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-logons                      │ Unique logons: 44                                                                                                       │ test/StackLogons.csv (2.69 KB)                                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-processes                   │ Unique processes: 138                                                                                                   │ test/StackProcesses.csv (27.91 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-services                    │ Unique services: 276                                                                                                    │ test/StackServices.csv (134.28 KB)                                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-tasks                       │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(target)               │ Unique users(target): 36                                                                                                │ test/StackTargetUsers.csv (21.05 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test/StackTargetUsers-NoFiltering.csv (28.19 KB)                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(source)               │ Unique users(source): 36                                                                                                │ test/StackSourceUsers.csv (21.05 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test/StackSourceUsers-NoFiltering.csv (28.19 KB)                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-logon                │ EID 4624 (Successful Logon): 310                                                EID 4625 (Failed Logon): 3,574          │ test/TimelineLogon.csv (0 Bytes)                                                                                        │
│                                   │ EID 4634 (Logoff): 13                                                           EID 4647 (User Initiated Logoff): 27    │                                                                                                                         │
│                                   │ EID 4648 (Explicit Logon): 307                                                  EID 4672 (Admin Logon): 103             │                                                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-partition-diagnostic │ Events: 0                                                                                                               │ test/TimelinePartitionDiagnostic.csv (81 Bytes)                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-suspicious-processes │ Events: 3,547                                                                                                           │ test/TimelineSuspiciousProcesses.csv (2.44 MB)                                                                          │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-tasks                │ Events: 8                                                                                                               │ test/TimelineTask.csv (11.32 KB)                                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-summary                       │ TTPs: 178                                                                                                               │ test/TTPSummary.csv (321.51 KB)                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-visualize                     │ You can import this into ATT&CK Navigator                                                                               │ test/MitreTTP-Heatmap.json (76.18 KB)                                                                                   │
└───────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Elapsed time: 0 hours, 0 minutes, 1 seconds

PS D:\opensource\takajo> ls

    Directory: D:\opensource\takajo

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          2023/10/20    20:06                .github
d----          2023/10/20    20:06                .vscode
d----          2024/03/23    20:31                case-1
d----          2024/03/23    22:06                nimcache
d----          2024/03/10    19:59                screenshots
d----          2024/03/23    19:52                src
d----          2024/03/27     8:54                test
d----          2024/03/22    23:07                testdir
d----          2024/03/23    22:06                tests
-a---          2024/03/14    23:59           4398 .cz-config.js
-a---          2024/03/10    19:59           2180 .gitignore
-a---          2024/03/22    23:05       44127128 1309.jsonl
-a---          2023/07/02     2:22           6620 24.log
-a---          2023/07/22    23:30          55296 a.log
-a---          2023/06/17    17:07     1644116775 all-evtx-260.csv
-a---          2023/06/17    17:35     2094896549 all-evtx-260.jsonl
-a---          2024/03/10    19:59           8321 CHANGELOG-Japanese.md
-a---          2024/03/10    19:59           6570 CHANGELOG.md
-a---          2024/03/23    22:06              0 generated_not_to_break_here
-a---          2024/03/10    19:59           2376 get-mitre-attack-ttps.py
-a---          2023/06/20    19:22        1990169 hse-260-sysmon-1-test.jsonl
-a---          2023/06/17    22:27        1901681 hse-260-sysmon-1.jsonl
-a---          2023/06/17    22:15       36351541 hse-260.jsonl
-a---          2023/03/04    16:52          35821 LICENSE.txt
-a---          2023/03/04    16:52          78734 logo.png
-a---          2024/03/10    19:59          98964 mitre-attack.json
-a---          2024/03/10    19:59         526336 pcre64.dll
-a---          2024/03/22    22:24          47360 README-Japanese.md
-a---          2024/03/22    22:24          39696 README.md
-a---          2023/06/20    22:37         343913 result.txt
-a---          2023/06/20    22:38         343913 result2.txt
-a---          2024/03/27     8:53        3291174 takajo.exe
-a---          2024/03/10    19:59            480 takajo.nimble
-a---          2024/03/23    21:52             48 temp.csv
-a---          2023/07/22    22:43          14546 test.log
-a---          2023/07/22    23:25          12198 testx.log
-a---          2023/07/02     2:08             61 testxxx-debug.log

PS D:\opensource\takajo> ./takajo.exe automagic -t .\testdir\1.jsonl -o test-2
┏━━━━┳━━━┳┓┏━┳━━━┓ ┏┳━━━┓
┃┏┓┏┓┃┏━┓┃┃┃┏┫┏━┓┃ ┃┃┏━┓┃
┗┛┃┃┗┫┃ ┃┃┗┛┛┃┃ ┃┃ ┃┃┃ ┃┃
  ┃┃ ┃┗━┛┃┏┓┓┃┗━┛┣┓┃┃┃ ┃┃
  ┃┃ ┃┏━┓┃┃┃┗┫┏━┓┃┗┛┃┗━┛┃
  ┗┛ ┗┛ ┗┻┛┗━┻┛ ┗┻━━┻━━━┛
  by Yamato Security

Started the automagic command

Automatically executes as many commands as possible and output results to a new folder.

File: .\testdir\1.jsonl (42.08 MB)
Counting total lines. Please wait.
Total lines: 32,332

Scanning the Hayabusa timeline. Please wait.

100%|█████████████████████████| 32332/32332 [ 0.9s< 0.0s,  57.97k/sec]

┌───────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Command                           │ Results                                                                                                                 │ Saved Files                                                                                                             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ extract-scriptblocks              │ PowerShell logs: 108                                                                                                    │ test-2/scriptblock-logs/Summary.csv (19.86 KB)                                  test-2/scriptblock-logs/*.txt           │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains                      │ Domains: 0                                                                                                              │ test-2/ListDomains.txt (0 Bytes)                                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-domains(detailed)            │ Domains: 2                                                                                                              │ test-2/ListDomainsDetailed.txt (16 Bytes)                                                                               │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-hashes                       │ MD5: 894                                                                        SHA1: 831                               │ test-2/ListHashes-MD5.txt (4.45 KB)                                             test-2/ListHashes-SHA1.txt (5.21 KB)    │
│                                   │ SHA256: 838                                                                     Import: 894                             │ test-2/ListHashes-SHA256.txt (8.31 KB)                                          test-2/ListHashes-ImportHashes.txt      │
│                                   │                                                                                                                         │ (4.08 KB)                                                                                                               │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ list-ip-addresses                 │ IP adddresses: 0                                                                                                        │ test-2/ListIP-Addresses.txt (0 Bytes)                                                                                   │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-cmdlines                    │ Unique cmdlines: 1,224                                                                                                  │ test-2/StackCmdlines.csv (413.00 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 53                                                                                                    │ test-2/StackTargetComputers.csv (45.05 KB)                                                                              │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-computers                   │ Unique computers: 3,571                                                                                                 │ test-2/StackSourceComputers.csv (383.32 KB)                                                                             │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-dns                         │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(source)        │ Unique ip-addresses(source): 18                                                                                         │ test-2/StackSourceIP-Addresses.csv (2.01 KB)                                                                            │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-ip-addresses(target)        │ Unique ip-addresses(target): 13                                                                                         │ test-2/StackTargetIP-Addresses.csv (1.25 KB)                                                                            │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-logons                      │ Unique logons: 44                                                                                                       │ test-2/StackLogons.csv (2.69 KB)                                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-processes                   │ Unique processes: 138                                                                                                   │ test-2/StackProcesses.csv (27.91 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-services                    │ Unique services: 276                                                                                                    │ test-2/StackServices.csv (134.28 KB)                                                                                    │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-tasks                       │ n/a                                                                                                                     │ n/a                                                                                                                     │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(target)               │ Unique users(target): 36                                                                                                │ test-2/StackTargetUsers.csv (21.05 KB)                                                                                  │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test-2/StackTargetUsers-NoFiltering.csv (28.19 KB)                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(source)               │ Unique users(source): 36                                                                                                │ test-2/StackSourceUsers.csv (21.05 KB)                                                                                  │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ stack-users(no filtering)         │ Unique users(no filtering): 55                                                                                          │ test-2/StackSourceUsers-NoFiltering.csv (28.19 KB)                                                                      │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-logon                │ EID 4624 (Successful Logon): 310                                                EID 4625 (Failed Logon): 3,574          │ test-2/TimelineLogon.csv (0 Bytes)                                                                                      │
│                                   │ EID 4634 (Logoff): 13                                                           EID 4647 (User Initiated Logoff): 27    │                                                                                                                         │
│                                   │ EID 4648 (Explicit Logon): 307                                                  EID 4672 (Admin Logon): 103             │                                                                                                                         │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-partition-diagnostic │ Events: 0                                                                                                               │ test-2/TimelinePartitionDiagnostic.csv (81 Bytes)                                                                       │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-suspicious-processes │ Events: 3,547                                                                                                           │ test-2/TimelineSuspiciousProcesses.csv (2.44 MB)                                                                        │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ timelinePath-tasks                │ Events: 8                                                                                                               │ test-2/TimelineTask.csv (3.77 KB)                                                                                       │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-summary                       │ TTPs: 178                                                                                                               │ test-2/TTPSummary.csv (107.17 KB)                                                                                       │
├───────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ttp-visualize                     │ You can import this into ATT&CK Navigator                                                                               │ test-2/MitreTTP-Heatmap.json (25.39 KB)                                                                                 │
└───────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Elapsed time: 0 hours, 0 minutes, 1 seconds

@fukusuket
Copy link
Collaborator

fukusuket commented Mar 27, 2024

@hitenkoku
Thank you so much for fix :) I confirmed that the error has been resolved!

It seems that only the last JSONL analysis result remains in the CSV file.(because it is overwritten each time JSONL analysis is performed).

I think we could solve the file overwriting issue if we control the directory for loop on the takajoCore.nim side🤔
What do you think? (I'm sorry if it's more difficult to control on the takajoCore.nim side...)

for line in lines(self.timeline):

@fukusuket
Copy link
Collaborator

Also, could you please check the following error?🙏
https:/Yamato-Security/takajo/actions/runs/8433564638/job/23094876153

I would appreciate it if you could check the above error as well🙏

@hitenkoku
Copy link
Collaborator Author

Thanks for your review.
I will check it.

@hitenkoku
Copy link
Collaborator Author

I fixed following problem. Evidence is https:/Yamato-Security/takajo/actions/runs/8471381947.

Would you check it?

Also, could you please check the following error?🙏
https:/Yamato-Security/takajo/actions/runs/8433564638/job/23094876153

I would appreciate it if you could check the above error as well🙏

@hitenkoku
Copy link
Collaborator Author

@fukusuket I fixed #145 (comment) problem in b816f9c.

Excuse me for repeatedly asking for a review, but could you please check?

@YamatoSecurity
Copy link
Collaborator

I get the following error:

./takajo automagic -t ../hayabusa/ -o test2
┏━━━━┳━━━┳┓┏━┳━━━┓ ┏┳━━━┓
┃┏┓┏┓┃┏━┓┃┃┃┏┫┏━┓┃ ┃┃┏━┓┃
┗┛┃┃┗┫┃ ┃┃┗┛┛┃┃ ┃┃ ┃┃┃ ┃┃
  ┃┃ ┃┗━┛┃┏┓┓┃┗━┛┣┓┃┃┃ ┃┃
  ┃┃ ┃┏━┓┃┃┃┗┫┏━┓┃┗┛┃┗━┛┃
  ┗┛ ┗┛ ┗┻┛┗━┻┛ ┗┻━━┻━━━┛
  by Yamato Security

Started the automagic command

Automatically executes as many commands as possible and output results to a new folder.

Counting total lines. Please wait.
File: ../hayabusa/test_files/evtx/test.jsonl (3.61 KB)
File: ../hayabusa/lowmem.jsonl (32.65 MB)
File: ../hayabusa/verbose-profile.jsonl (37.70 MB)
File: ../hayabusa/secret.jsonl (2.99 GB)
File: ../hayabusa/highmem.jsonl (32.79 MB)
File: ../hayabusa/sample.jsonl (37.71 MB)
File: ../hayabusa/4697.jsonl (8.24 KB)
File: ../hayabusa/default-profile.jsonl (31.97 MB)
File: ../hayabusa/pcxx.jsonl (16.03 MB)
Total lines: 4,029,619

Scanning the Hayabusa timeline. Please wait.

  0%|                         |       0/4029619 [ 0.0s<  ??s,      ??/sec]SIGSEGV: Illegal storage access. (Attempt to read from nil?)
zsh: segmentation fault  ./takajo automagic -t ../hayabusa/ -o test2

@fukusuket
Copy link
Collaborator

fukusuket commented Mar 29, 2024

@hitenkoku
Thank you so much for fix!! I confirmed following #145 (comment) issue was resolved!

@YamatoSecurity
Thank you for checking!
Does #145 (comment) also occur in main? Does it only occur on this branch?
Which file causes the error...?🤔(I think that With Nim, there is not much error information, so it is difficult to find out what is causing the problem...😇)

@YamatoSecurity
Copy link
Collaborator

Thank you for checking!
Does #145 (comment) also occur in main? Does it only occur on this branch?
Which file causes the error...?🤔(I think that With Nim, there is not much error information, so it is difficult to find out what is causing the problem...😇)

I found the problem: File: ../hayabusa/test_files/evtx/test.jsonl (3.61 KB)
When I removed this it works. LGTM!

Copy link
Collaborator

@YamatoSecurity YamatoSecurity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I updated the changelog and some wording.

Copy link
Collaborator

@fukusuket fukusuket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for fix and checking!! LGTM!!🚀

@YamatoSecurity YamatoSecurity merged commit 5a1d8b0 into main Mar 29, 2024
2 checks passed
@YamatoSecurity YamatoSecurity deleted the 133-support-d-directory branch March 29, 2024 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support -d, --directory
3 participants